<template>
  <div id="app" class="theme-transition">
    <a-config-provider :locale="zhCN">
      <BasicLayout></BasicLayout>
    </a-config-provider>
  </div>
</template>

<script setup lang="ts">
import BasicLayout from '@/layouts/BasicLayout.vue'
import { healthUsingGet } from '@/api/mainController.ts'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import { useThemeStore } from '@/stores/useThemeStore'
import { onMounted } from 'vue'
// import {useLoginUserStore} from "@/stores/useLoginUserStore.ts";

// 设置dayjs的语言
dayjs.locale('zh-cn')

// 初始化主题
const themeStore = useThemeStore()
onMounted(() => {
  themeStore.initTheme()

  healthUsingGet().then((res) => {
    console.log(res)
  })
})

// 已经改为在权限校验文件中获取
// const loginUserStore = useLoginUserStore()
// loginUserStore.fetchLoginUser()
</script>

<style>
/* 全局样式 */
#app {
  width: 100%;
  height: 100%;
  background-color: var(--primary-bg-color);
  color: var(--text-primary-color);
}
</style>
